package com.liuyingxing.javaSpringCloudTest.service;

import com.github.pagehelper.PageInfo;
import com.liuyingxing.entity.common.Result;
import com.liuyingxing.entity.common.SearchBean;
import com.liuyingxing.entity.test.City;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * @File CityService.java
 * @Auth liuxing
 * @Date 2021/8/19 10:39
 * @Email liuxing997@foxmail.com
 */
public interface CityService {

    //添加城市信息
    Result<City> insertCity(City city);

    //根据城市ID修改城市信息
    Result<City> updateCity(City city);

    //根据城市ID删除城市信息
    Result<Object> deleteCityByCityId(int cityId);

    //根据城市ID查询城市信息
    City getCityByCityId(int cityId);

    //根据国家ID查询所有城市信息
    List<City> getCitiesByCountryId(int countryId);

    //分页查询
    PageInfo<City> getCitiesBySearchBean(SearchBean searchBean);

    Result<Object> insertCities(List<City> cities);
}
